package com.create404.suishoupai.controller;


import com.create404.suishoupai.service.IAnnouncementService;
import com.create404.suishoupai.utils.Result;
import com.create404.suishoupai.vo.AnnouncementListItemVO;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author create404
 * @since 2021-07-17
 */
@Api(tags = "公告接口")
@RestController
@RequestMapping("/announcement")
public class AnnouncementController {

    @Autowired
    private IAnnouncementService iAnnouncementService;

    @GetMapping("/announcementList")
    public Result getAnnouncementList() {
        List<AnnouncementListItemVO> announcementList = iAnnouncementService.getAnnouncementList();
        return Result.ok(announcementList);
    }

}
